﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLBH
{
    public partial class frmLogin : Form
    {
        public bool Flag = false;
        public frmLogin()
        {
            InitializeComponent();
        }

        private void btOk_Click(object sender, EventArgs e)
        {
            if (txtName.Text == "Admin" && txtPass.Text == "123456")
            {
                Flag = true;
            }
            else
            {
                MessageBox.Show("Đăng nhập thất bại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Flag = false;
            }
            if(Flag)
                this.Close();
        }

        private void btCancel_Click(object sender, EventArgs e)
        {
            Flag = false;
            this.Close();
        }


    }
}
